package com.evola.dbsm.model
{
	import mx.collections.ArrayCollection;
	import mx.collections.ICollectionView;
	import mx.collections.IList;

	[Bindable]
	[RemoteClass(alias="com.evola.dbsm.model.ProjectBean")]
	public class ProjectBean extends BaseBean
	{

		private var _uniqueId:String;
		private var _name:String;
		private var _description:String;

		private var _scripts:IList=new ArrayCollection();

		private var _owner:UserBean;

		private var _databases:IList=new ArrayCollection();

		private var _members:IList=new ArrayCollection();

		public function ProjectBean()
		{
			super();
		}

		public function get uniqueId():String
		{
			return _uniqueId;
		}

		public function set uniqueId(value:String):void
		{
			_uniqueId=value;
		}

		public function get name():String
		{
			return _name;
		}

		public function set name(value:String):void
		{
			_name=value;
		}

		public function get description():String
		{
			return _description;
		}

		public function set description(value:String):void
		{
			_description=value;
		}

		public function get scripts():IList
		{
			return _scripts;
		}

		public function set scripts(value:IList):void
		{
			_scripts=value;
		}

		public function get owner():UserBean
		{
			return _owner;
		}

		public function set owner(value:UserBean):void
		{
			_owner=value;
		}

		public function get databases():IList
		{
			return _databases;
		}

		public function set databases(value:IList):void
		{
			_databases=value;
		}

		public function get members():IList
		{
			return _members;
		}

		public function set members(value:IList):void
		{
			_members=value;
		}


		public function addDatabase(_currentDatabase:DatabaseBean):void
		{
			if (!databases)
				databases=new ArrayCollection();

			databases.addItem(_currentDatabase);
		}
	}
}
